<div id="main">
    <div id="contents_stat">
        <form method="post" name="filters">
            <br>
            <table class="cmenutitle" cellspacing="0" cellpadding="0" border="0" width="100%">
                <tbody>
                <tr width="100%">
                    <td class="frame_tab_left">
                        <label sid="help.td1"></label>
                    </td>
                    <td class="frame_tab_right">
                        <input class="input-noborder" type="text" readonly="readonly" name="id_name" style="background-color: rgb(204, 204, 204);">
                    </td>
                </tr>
              <!--  <tr>
                    <td class="frame_tab_left">
                        <label sid="wrom_status.system_uptime"></label>
                    </td>
                    <td class="frame_tab_right">
                        <input id="starttime" class="input-noborder" type="text" readonly="readonly" name="starttime" style="background-color: rgb(204, 204, 204);">
                    </td>
                </tr>-->
                <tr>
                    <td class="frame_tab_left">
                        <label sid="help.td2"></label>
                    </td>
                    <td class="frame_tab_right">
                        <input class="input-noborder" type="text" readonly="readonly" name="fxs" style="background-color: rgb(204, 204, 204);">
                    </td>
                </tr>
                <tr>
                    <td class="frame_tab_left">
                        <label sid="help.td3"></label>
                    </td>
                    <td class="frame_tab_right">
                        <input class="input-noborder" type="text" readonly="readonly" name="fxo" style="background-color: rgb(204, 204, 204);">
                    </td>
                </tr>
                <tr>
                    <td class="frame_tab_left">
                        <label sid="help.td4"></label>
                    </td>
                    <td class="frame_tab_right">
                        <input class="input-noborder" type="text" readonly="readonly" name="id56" style="background-color: rgb(204, 204, 204);">
                    </td>
                </tr>
                <tr>
                    <td class="frame_tab_left">
                        <label sid="help.td5"></label>
                    </td>
                    <td class="frame_tab_right">
                        <input class="input-noborder" type="text" readonly="readonly" name="id1111" style="background-color: rgb(204, 204, 204);">
                    </td>
                </tr>
                <tr id="tr58" style="display: none;">
                    <td class="frame_tab_left">
                        <label sid="help.td6"></label>
                    </td>
                    <td class="frame_tab_right">
                        <input class="input-noborder" type="text" readonly="readonly" name="id58" style="background-color: rgb(204, 204, 204);">
                    </td>
                </tr>
                <tr class="om">
                    <td class="frame_tab_left">
                        <label sid="help.td7"></label>
                    </td>
                    <td class="frame_tab_right">
                        <input class="input-noborder" type="text" readonly="readonly" name="id528" style="background-color: rgb(204, 204, 204);">
                    </td>
                </tr>
                <tr>
                    <td class="frame_tab_left">
                        <label sid="help.td8"></label>
                    </td>
                    <td class="frame_tab_right">
                        <input class="input-noborder" type="text" readonly="readonly" name="id527" style="background-color: rgb(204, 204, 204);">
                    </td>
                </tr>
                <tr>
                    <td class="frame_tab_left">
                        <label sid="help.td9"></label>
                    </td>
                    <td class="frame_tab_right">
                        <input class="input-noborder" type="text" readonly="readonly" name="id7" style="background-color: rgb(204, 204, 204);">
                    </td>
                </tr>
                <tr>
                    <td class="frame_tab_left">
                        <label sid="help.td10"></label>
                    </td>
                    <td class="frame_tab_right">
                        <input class="input-noborder" type="text" readonly="readonly" name="id70" style="background-color: rgb(204, 204, 204);">
                    </td>
                </tr>
                <tr>
                    <td class="frame_tab_left">
                        <label sid="help.td11"></label>
                    </td>
                    <td class="frame_tab_right">
                        <input class="input-noborder" type="text" readonly="readonly" name="id88" style="background-color: rgb(204, 204, 204);">
                    </td>
                </tr>
       <!--         <tr id="omnr">
                    <td class="frame_tab_left">
                        <label sid="help.td12"></label>
                    </td>
                    <td class="frame_tab_right" id="helpinfo">
                        <script type="text/javascript">
                            $("#helpinfo").html('<a target="_blank" href="'+help.helpurl+'"\">'+help.helpurl+'</a>')
                        </script>
                    </td>
                </tr>-->
                </tbody>
            </table>
        </form>
    </div>
</div>

<script type="text/javascript">
    var types = getCookie("type");
    if (types = "MX4") {
        $("#tr58").hide();
    }
    var sendtext = '&id=57&id=75';
    var nonames = new Array('text', 'id1111', 'submit', 'reset', 'id_name', 'fxs', 'fxo','starttime');
    sendtext += getSendText(nonames);
	DataRequest("get_json",sendtext,function(data){
  	getResult(nonames,data);
  	var name57 = data["id57"];
  	var st = data["id75"];
  	if(st=="0"){
  		$("#omnr").show();
  		}else{
  		$("#omnr").hide();
  		}
    var str = name57.split(" ");
    var cfgvalue = str[0] + " " + str[1] + " " + str[2];
    var cfgvalue1 = str[3] + " " + str[4] + " " + str[5];
    cfgvalue1 = $.trim(cfgvalue1);
    $("input[name=id1111]").val([cfgvalue1]);
    if (str[2].indexOf("-") >= 0) {
           var loop = str[2].split("-");
           var gateway = loop[0];
            if (loop[1].indexOf("/") >= 0) {
            	var line = loop[1].split("/");
                var fxs = line[0].split("S")[0];
                var fxo = line[1];
                $("input[name=fxs]").val([fxs]);
                $("input[name=fxo]").val([fxo]);
            } else if (loop[1].indexOf("S") >= 0) {
                var fxs = loop[1].split("S")[0];
                var fxo = 0;
                $("input[name=fxs]").val([fxs]);
                $("input[name=fxo]").val([fxo]);
            } else if (loop[1].indexOf("FXO") >= 0) {
                var fxo = loop[1].split("FXO")[0];
                var fxs = 0;
                $("input[name=fxs]").val([fxs]);
                $("input[name=fxo]").val([fxo]);
            } else {
                var fxs = 0;
                var fxo = 0;
                $("input[name=fxs]").val([fxs]);
                $("input[name=fxo]").val([fxo]);
           }
    } else {
		var fxs = 0;
		var fxo = 0;
		$("input[name=fxs]").val([fxs]);
		$("input[name=fxo]").val([fxo]);
		}
        if(st=="0"){
            if(fxs==1&&fxo==1){
                $("input[name=id_name]").val("WROC2011");
            }else if(fxs==2){
                $("input[name=id_name]").val("WROC2002");
            }else{
                $("input[name=id_name]").val("WROC");
            }
        }else{
            if(fxs==1&&fxo==1){
                $("input[name=id_name]").val("1FXS/1FXO");
            }else if(fxs==2){
                $("input[name=id_name]").val("2FXS");
            }else{
                $("input[name=id_name]").val(fxs+"FXS"+fxo+"FXO");
            }
        }
		DataRequest("/cgi-bin/stat?sysinfo","",function(data){
		$("#starttime").attr("value",data["uptime"]);
	});
  });
  function load_html(){
  	DataRequest("/cgi-bin/stat?sysinfo","",function(data){
		$("#starttime").attr("value",data["uptime"]);
	});
  	}
    load_html();
</script>
</body>
</html>
